doc: clarify length param in buffer.write#32119
Closed
HarshithaKP wants to merge 6 commits intonodejs:masterfrom
Closed
doc: clarify length param in buffer.write#32119HarshithaKP wants to merge 6 commits intonodejs:masterfrom
length param in buffer.write#32119HarshithaKP wants to merge 6 commits intonodejs:masterfrom
Conversation
HarshithaKP
added a commit
to HarshithaKP/node
that referenced
this pull request
Mar 6, 2020
Make sure longer strings are written up to the buffer end Refs: nodejs#32119
4 tasks
BridgeAR
reviewed
Mar 9, 2020
jasnell
reviewed
Mar 10, 2020
jasnell
approved these changes
Mar 11, 2020
Member
|
@HarshithaKP There are conflicts here, can you rebase against master? |
`buffer.write` documentation has an incaccuracy w.r.t the `length` parameter: It says default number of bytes written is `buf.length - offset`. Change it to: If the buffer has sufficient space from the offset, the string is written upto `length`. If the buffer is short in space, only `buf.length - offset` bytes are written. Refs : nodejs#32104 (comment)
73ae863 to
7841713
Compare
Member
Author
|
@addaleax, thanks. Rebased it. PTAL. |
addaleax
reviewed
Mar 13, 2020
addaleax
reviewed
Mar 29, 2020
addaleax
reviewed
Mar 30, 2020
addaleax
approved these changes
Mar 30, 2020
addaleax
pushed a commit
that referenced
this pull request
Apr 5, 2020
`buffer.write` documentation has an incaccuracy w.r.t the `length` parameter: It says default number of bytes written is `buf.length - offset`. Change it to: If the buffer has sufficient space from the offset, the string is written upto `length`. If the buffer is short in space, only `buf.length - offset` bytes are written. Refs: #32104 (comment) PR-URL: #32119 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Member
|
Landed in d03d9a0 |
BethGriggs
pushed a commit
that referenced
this pull request
Apr 7, 2020
`buffer.write` documentation has an incaccuracy w.r.t the `length` parameter: It says default number of bytes written is `buf.length - offset`. Change it to: If the buffer has sufficient space from the offset, the string is written upto `length`. If the buffer is short in space, only `buf.length - offset` bytes are written. Refs: #32104 (comment) PR-URL: #32119 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos
pushed a commit
that referenced
this pull request
Apr 12, 2020
`buffer.write` documentation has an incaccuracy w.r.t the `length` parameter: It says default number of bytes written is `buf.length - offset`. Change it to: If the buffer has sufficient space from the offset, the string is written upto `length`. If the buffer is short in space, only `buf.length - offset` bytes are written. Refs: #32104 (comment) PR-URL: #32119 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos
pushed a commit
that referenced
this pull request
Apr 22, 2020
`buffer.write` documentation has an incaccuracy w.r.t the `length` parameter: It says default number of bytes written is `buf.length - offset`. Change it to: If the buffer has sufficient space from the offset, the string is written upto `length`. If the buffer is short in space, only `buf.length - offset` bytes are written. Refs: #32104 (comment) PR-URL: #32119 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
buffer.writedocumentation has an incaccuracy w.r.t thelengthparameter:It says default number of bytes written is
buf.length - offset. Change it to:If the buffer has sufficient space from the offset, the string is written upto
length.If the buffer is short in space, only
buf.length - offsetbytes are written.proof:
Refs : #32104 (comment)
Thanks to @addaleax for her suggestion in the above comment, that lead to this finding.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes